package com.ziyun.erp.modules.invoice.dao;

import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.ziyun.erp.modules.invoice.entity.OrderInvoiceEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ziyun.erp.modules.invoice.entity.OrderInvoiceRegisterVo;
import com.ziyun.erp.modules.invoice.entity.OrderInvoiceVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 发票信息表
 * 
 * @author gaosheng
 * @email 
 * @date 2018-08-25 15:13:13
 */
@Service("orderInvoiceDao")
public interface OrderInvoiceDao extends BaseMapper<OrderInvoiceEntity> {

    /**
     *  数据更新
     * @param map 参数
     * @param oiId 发票ID
     * @return
     */
    boolean updateByMap(@Param("map") Map<String, Object> map, @Param("oiId") Integer oiId);

    /**
     * 发票登记列表数据量查询
     * @param map 查询参数
     * @return
     */
    int countOrderInvoiceRegister(@Param("map") Map<String, Object> map);

    /**
     * 发票登记列表查询
     * @param map 查询参数
     * @return
     */
    List<OrderInvoiceRegisterVo> queryPageOrderInvoiceRegisterList(@Param("map") Map<String, Object> map);

    /**
     * 发票列表查询
     * @param page
     * @param params
     * @return
     */
    List<OrderInvoiceVo> queryPageOrderInvoiceList(Pagination page, @Param("map") Map<String, Object> params);
}
